<!DOCTYPE html>
<html lang="cn-Zh">

<head>
    <meta charset="UTF-8">
    <title>学生管理系统</title>
    <style>
        * {
            text-align: center;
            background: #E7F5FE;
        }

        h1 {
            font-size: 50px;
        }

        form {
            display: inline-block;
        }

        #input_box {
            height: 60px;
            box-sizing: border-box;
            font-size: 20px;
            border-radius: 10px;
            float: left;
            margin: 0px 10px 0px 100px;
        }

        form #che {
            height: 40px;
            background: lightseagreen;
            border: 0px;
            font-size: 30px;
            padding: 10px;
            border-radius: 10px;
            box-sizing: content-box;
        }

        form #che:hover {
            cursor: pointer;
        }

        #add {
            text-decoration: none;
            color: inherit;
            font-size: 30px;
            margin: 5px;
            padding: 10px;
            border-radius: 10px;
            background: lightgreen;
            display: inline-block;
        }

        #error_message {
            text-align: center;
            font-size: 30px;
            color: red;
        }

        #stu_table #stu_system tr td form {
            height: 40px;
            padding: 4px;
            margin: 4px;
        }

        #stu_table #stu_system tr td .del {
            border: 0px;
            font-size: 30px;
            border-radius: 10px;
            background: lightcoral;
        }

        #stu_table #stu_system tr td .del:hover {
            cursor: pointer;
        }

        #stu_table #stu_system tr td .cha {
            border: 0px;
            font-size: 30px;
            border-radius: 10px;
            background: lightskyblue;
        }

        #stu_table #stu_system tr td .cha:hover {
            cursor: pointer;
        }

        #stu_system {
            font-size: 30px;
            margin: 20px auto;
            border-collapse: collapse;
        }

        #stu_system tr th {
            border: 1px black solid;
            padding: 0px 10px 0px
        }

        #stu_system tr td {
            border: 1px black solid;
            padding: 0px 10px 0px
        }
    </style>
</head>

<body>

    <h1>学生管理系统</h1>

    <div>
        <a href="/stu/add" id="add">添加</a>
        <form action="">
            <input type="text" name="che" placeholder="输入要搜索的内容" id="input_box">
            <input type="submit" value="查询" id="che">
        </form>
        <p id="error_message">{{error_message}}</p>
    </div>


    <div id="stu_table">
        <table id="stu_system">
            <tr>
                <th>学号</th>
                <th>姓名</th>
                <th>年龄</th>
                <th>性别</th>
                <th>操作</th>
            </tr>

            {%for student in user:%}
            <tr>
                <td>{{ student.sid }}</td>
                <td>{{ student.name }}</td>
                <td>{{ student.age }}</td>
                <td>{{ student.gender }}</td>
                <td>
                    <form action="">
                        <input type="hidden" name="del" value={{student.sid}}>
                        <input type="submit" value="删除" class="del">
                    </form>

                    <form action="/stu/correct/{{student.sid}}" method="">
                        <input type="submit" class="cha" value="修改"></button>
                    </form>
                </td>
            </tr>
            {% endfor %}

        </table>
    </div>

</body>

</html>